package com.oms.app.address.service.impl;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.oms.app.address.dao.IAddressDAO;
import com.oms.app.address.model.Address;
import com.oms.app.address.service.IAddressService;
import com.oms.core.service.impl.GeneralService;

/**
 * @author Loong_Mit
 * @date Sep 1, 2012 7:03:38 PM
 */

public class AddressServiceImpl extends GeneralService<Address, String> implements IAddressService {
	
	@Override
	public List<Address> getAddressList(HttpServletRequest request) {
		return ((IAddressDAO) dao).getAddressList(request);
	}
	
	@Override
	public boolean addAddress(Address address) {
		return ((IAddressDAO) dao).addAddress(address);
	}

	@Override
	public boolean deleteAddress(String PK) {
		return ((IAddressDAO) dao).deleteAddress(PK);
	}

	@Override
	public Address getAddressByPK(String PK) {
		return ((IAddressDAO) dao).getAddressByPK(PK);
	}

	@Override
	public boolean updateAddress(Address address) {
		return ((IAddressDAO) dao).updateAddress(address);
	}

	@Override
	public boolean saveAddressRelation(Map<String, Object> map) {
		return ((IAddressDAO) dao).saveAddressRelation(map);
	}
	
	@Override
	public boolean deleteAddressRelation(Map<String, Object> map) {
		return ((IAddressDAO) dao).deleteAddressRelation(map);
	}
	
	@Override
	public List<Address> getAddressByParentId(String parentId) {
		return ((IAddressDAO) dao).getAddressByParentId(parentId);
	}
}